package com.huilang.demo1;

public interface Biulder {
    Bike bike = new Bike();

    void biuddFrame();

    void biuldSeat();

    Bike createBike();
}

/**
 *  具体的构建者，用来构建摩拜单车对象
 */
class MObileBiulder implements Biulder {
    @Override
    public void biuddFrame() {
        bike.setFrame("碳纤维车架");
    }

    @Override
    public void biuldSeat() {
        bike.setSeat("真皮车座");
    }

    @Override
    public Bike createBike() {
        return bike;
    }
}

class OfoBiulder implements Biulder {

    @Override
    public void biuddFrame() {
        bike.setFrame("铝合金车架");
    }

    @Override
    public void biuldSeat() {
        bike.setSeat("橡皮车座");
    }

    @Override
    public Bike createBike() {
        return bike;
    }
}